package com.syzygy.mapper;

import com.syzygy.pojo.Picture;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface PictureMapper {
    public List<String> getAllPictureId();

    Picture getPictureById(@Param("pictureId") String pictureId);

    //    List<Picture> getAllPictureAndUser();
    List<Picture> getAllPicture();

    int uploadPicture(@Param("pictureId") String pictureId,
                      @Param("pictureDocumentName") String pictureDocumentName,
                      @Param("userId") int userId,
                      @Param("typeId") int typeId,
                      @Param("price") double price,
                      @Param("describe") String describe);

    List<Picture> getPicturesByUserId(@Param("userId") int userId);

    List<Picture> getPicturesByTypeId(int typeId);

    int updatePictureByPictureId(@Param("describe") String describe,
                                 @Param("typeId") int typeId,
                                 @Param("price") double price,
                                 @Param("pictureId") String pictureId);

    int deletePictureByPictureId(@Param("pictureId") String pictureId);

    int updateStateByPictureId(@Param("state") String state,
                               @Param("pictureId") String pictureId);
}
